It has become increasingly clear that both spontaneous and trained behaviors engage activity throughout the cortex. However, at least in the case of perceptual decisions, task complexity critically modulates the underlying large- and mesoscale cortical dynamics. When decisions are simple sensorimotor mappings, cortical activity is correlated, and behavioral effects of inactivation are essentially restricted to the relevant sensory areas. Conversely, when decisions are complex and demanding, e.g. when accumulating evidence over seconds, cortical activity becomes decorrelated and behavioral effects of inactivation are widespread, indicating distributed processes. The present proposal seeks to understand two important problems related to these observations. In the postdoctoral (K99) stage, I will use a combination of virtual-reality based behavior, temporally-specific optogenetic inactivations from many cortical regions, simultaneous two-photon calcium imaging from groups of cortical areas with cellular resolution, and a dynamical model of large-scale cortical activity to understand how distributed processes support complex perceptual decisions, particularly evidence accumulation. In the independent research (R00) phase, I will seek to understand the mechanisms underlying task-induced changes in large-scale cortical dynamics. In particular, I will use task switching in virtual reality, large-scale calcium imaging at mesoscale or cellular resolution, pharmacogenetics, optogenetics and modeling, in isolation or combined, to test the hypothesis that the basal forebrain cholinergic system is part of the mechanism that induces large-scale decorrelations with increased task complexity. I thus aim to use a unique combination of state-of-the-art techniques to provide a detailed and causal account of how distributed cortical process underlie complex decision-making, and how task-specific cortical states are influenced by neuromodulation. Beyond its importance for basic research, elucidating these processes will be crucial for understanding and treating the deficits in decision-making that are a hallmark of many brain disorders such as obsessive-compulsive disorder, attention deficit hyperactivity disorder and drug abuse.